function throttle (fn,delay) {
  let last = 0
  return function (...args) {
    let now = new Date()
    if(now - last > delay) {
      last = now
      fn.apply(this,args)
    }
  }
}